Cosmetic fixes, updated rainbow_cycle#33
Merged
caternuson merged 3 commits intoadafruit:masterfrom Oct 17, 2018
Merged
Conversation
Contributor
|
General comment as this applies to the entire file. This example was written before the ability to define pixel order in the constructor was added. See issue #1 and pr #24. Using |
Contributor
Author
|
I totally forgot about that. You're right. |
Contributor
|
Yep. Like that. Now that
For 2., here's maybe a way to change def wheel(pos):
# Input a value 0 to 255 to get a color value.
# The colours are a transition r - g - b - back to r.
if pos < 0 or pos > 255:
r = g = b = 0
elif pos < 85:
r = int(pos * 3)
g = int(255 - pos*3)
b = 0
elif pos < 170:
pos -= 85
r = int(255 - pos*3)
g = 0
b = int(pos*3)
else:
pos -= 170
r = 0
g = int(pos*3)
b = int(255 - pos*3)
return (r, g, b) if ORDER == neopixel.RGB or ORDER == neopixel.GRB else (r, g, b, 0) |
Contributor
Author
|
That's the thing that caught my eye in the first place. I'll try to work in this suggestion. |
tannewt
pushed a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
Oct 18, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel to 3.3.2 from 3.3.1: > Merge pull request adafruit/Adafruit_CircuitPython_NeoPixel#33 from kattni/example-update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.